<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<html>
<head>
    <base href="<%=basePath%>">

    <title>医疗服务管理</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <script type="text/javascript" src="gko100/back/js/jquery-1.4.2.min.js"></script>  
    <script type="text/javascript" src="gko100/back/js/jquery.form.js"></script>        
    <script type="text/javascript">  
		function uploadImage() {  
		    $(document)  
		            .ready(  
		                    function() {  
		                        var options = {  
		                            url : "uploadFile.action",  
		                            type : "POST",  
		                            dataType : "script",  
		                            success : function(msg) {  
		                                if (msg.indexOf("#") > 0) {  
		                                    var data = msg.split("#");  
		                                    $("#tipDiv").html(data[0]);  
		                                    $("#showImage").html("<img src='showImage.action?imageUrl="+data[1]+"'/>");  
		                                } else {  
		                                    $("#tipDiv").html(msg);  
		                                }  
		                            }  
		                        };  
		                        $("#form2").ajaxSubmit(options);  
		                        return false;  
		                    });  
		}  
	</script>
    <style>
			
			body {
				margin-left: 0px;
				margin-top: 0px;
				margin-right: 0px;
				margin-bottom: 0px;
			}
			.STYLE1 {font-size: 12px}
			.STYLE3 {font-size: 12px; font-weight: bold; }
			.STYLE4 {
				color: #03515d;
				font-size: 12px;
			}
			form {
				margin: 0;
			}
			textarea {
				display: block;
			}
			#main{
				margin-left:5px;
			}
		</style>
		<script charset="utf-8" src="kindeditor/kindeditor.js"></script>
		<script charset="utf-8" src="kindeditor/lang/zh_CN.js"></script>
		<script charset="utf-8" src="kindeditor/plugins/code/prettify.js"></script>
		<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="arti.artiCont"]', {
				cssPath : 'kindeditor/plugins/code/prettify.css',
				uploadJson : 'arti_image_add.action',
				fileManagerJson : 'file_manager_json.jsp',
				allowFileManager : false,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
				}
			});
			var editor2 = K.create('textarea[name="arti.artiSumm"]', {
				resizeType : 1,
				allowPreviewEmoticons : false,
				allowImageUpload : false,
				items : [
					'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
					'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
					'insertunorderedlist', '|', 'emoticons', 'link']
			});
			prettyPrint();
		});
	</script>
</head>

<body>
	<div id="main">
	    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
			    	<td height="30" background="gko100/back/admin/images/tab_05.gif">
			    		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			      			<tr>
			        			<td width="12" height="30">
			        				<img src="gko100/back/admin/images/tab_03.gif" width="12" height="30" />
			        			</td>
			        			<td>
			        				<table width="100%" border="0" cellspacing="0" cellpadding="0">
			          					<tr>
			            					<td width="46%" valign="middle">
			            						<table width="100%" border="0" cellspacing="0" cellpadding="0">
			              							<tr>
			                							<td width="5%">
			                								<div align="center">
			                									<img src="gko100/back/admin/images/tb.gif" width="16" height="16" />
			                								</div>
			                							</td>
			                							<td width="95%" class="STYLE1">
			                								<span class="STYLE3">当前位置</span>：[<s:property value="cate.name" />信息管理]-[更新信息]
			                							</td>
			              							</tr>
			            						</table>
			            					</td>
			          					</tr>
			        				</table>
			        			</td>
			        			<td width="16"><img src="gko100/back/admin/images/tab_07.gif" width="16" height="30" /></td>
			      			</tr>
			    		</table>
			    	</td>
			  	</tr>
	    		<tr>
	    			<td>
	    				<s:iterator value="cateList" id="cl">
	    					<a href="<s:property value='#cl.url' /><s:property value='#cl.catePid' />" target="mainFrame" ><s:property value='#cl.name' /></a>&nbsp;&nbsp;
	    				</s:iterator>
	    			</td>
	    		</tr>
			</table>
			<!-- 上传视频缩略图 -->
			<s:if test="%{nav.navNote=='ms_cn'||nav.navNote=='ms_en'||nav.navNote=='fl_cn'||nav.navNote=='fl_en'||nav.navNote=='tf_cn'||nav.navNote=='tf_en'}">
				<s:form id="form2" enctype="multipart/form-data" >
					<tr>
						<td height="25">
							视频缩略图：
						</td>
						<td>
							<input id="fileupload" name="fileupload" type="file" />
							<div id="tipDiv"></div>
							
						</td>
						<td colspan="2" align="left" >
							<input type="button" class="right-button02" onclick="uploadImage()" value="上传" />
						</td>
					</tr>
					<tr>
						<td><div id="showImage"></div></td>
						
					</tr>
				</s:form>

			</s:if>
			<s:form action="arti_modify.action" method="post" name="example" target="mainFrame">
				
				<s:if test="navList!=null">
					<s:select list="navList" name="navIdList" listKey="navId" listValue="navName" label="所属类别" headerKey="0" headerValue="--请选择类别--" required="true" value="navIdList" />
				</s:if> 
				
				<s:if test="diseMap!=null">
					<s:iterator value="diseMap.keySet()" id="ds">
						<s:checkboxlist cssStyle="" name="diseaseIdList" list="diseMap.get(#ds)"  
							listKey="diseaseId" listValue="title" value="diseaseIdList" label="请选择"  />
					</s:iterator>
					
					
				</s:if>
				<s:textfield name="arti.artiTitle" label="名称"  cssClass="" />
				
				<s:textarea name="arti.artiSumm"  cssStyle="width:700px;height:200px;visibility:hidden;" label="文章简介" />	
				<s:textarea name="arti.artiCont"  cssStyle="width:700px;height:200px;visibility:hidden;" label="文章内容" />	
				
				<s:textfield name="arti.artiSource" label="来源"  cssClass="" />
				<s:textfield name="arti.artiAuthor" label="发布者" value="%{#session.admin.name}" ></s:textfield>
				<s:submit value="更新" />
			</s:form>
	    	<s:debug></s:debug>
	
	</div>
</body>

</html>
